home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Libraries / tcl7.4b3 / doc / Tcl_Main.3 < prev    next >
Encoding:
Text File  |  1995-01-30  |  1.3 KB  |  45 lines

  1. '\"
  2. '\" Copyright (c) 1994 The Regents of the University of California.
  3. '\" Copyright (c) 1994-1995 Sun Microsystems, Inc.
  4. '\"
  5. '\" See the file "license.terms" for information on usage and redistribution
  6. '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  7. '\" 
  8. '\" @(#) Tcl_Main.3 1.3 95/01/30 10:41:26
  9. '\" 
  10. .so man.macros
  11. .HS Tcl_Main tclc 7.4
  12. .BS
  13. .SH NAME
  14. Tcl_Main \- main program for Tcl-based applications
  15. .SH SYNOPSIS
  16. .nf
  17. \fB#include <tk.h>\fR
  18. .sp
  19. \fBTcl_Main\fR(\fIargc, argv\fR)
  20. .SH ARGUMENTS
  21. .AS Tcl_FreeProc clientData
  22. .AP int argc in
  23. Number of elements in \fIargv\fR.
  24. .AP char *argv[] in
  25. Array of strings containing command-line arguments.
  26. .BE
  27.  
  28. .SH DESCRIPTION
  29. .PP
  30. \fBTcl_Main\fR acts as the main program for most Tcl-based applications.
  31. It is not called \fBmain\fR because it is part of the Tcl library and
  32. having a function \fBmain\fR
  33. in a library (particularly a shared library) causes problems on many
  34. systems.
  35. This would also make it hard to use Tcl in C++ programs,
  36. since C++ programs must have special C++ \fBmain\fR functions.
  37. .PP
  38. Normally each application contains a small \fBmain\fR function that does
  39. nothing but invoke \fBTcl_Main\fR.
  40. \fBTcl_Main\fR then does all the work of creating and running a
  41. \fBtclsh\fR-like application.
  42.  
  43. .SH KEYWORDS
  44. command-line arguments, main program
  45.